<%--本Tag用于与用友EAI接口同步后呈现某些不能被修改，只作显示用的数据 --%>
<%@ tag body-content="scriptless"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ tag import="com.probiz.estore.common.helper.ConfigUtil" %>
<%@ attribute name="ids" required="true" rtexprvalue="true" type="java.lang.String" description="多个表单控件id组成的字符串，请用,分隔，例如'text1,checkbox1,select1',至少需要一个id"%>

<%
	if(ConfigUtil.getInstance().isEaiEnabled()){ 
%>

<script type="text/javascript" defer>
var ids = "${ids}";
var idArray = ids.split(",");

$j(document).ready(function () {
	for(var i=0; i< idArray.length; i++){
		var field = $j('#'+idArray[i])[0];
		if(field.nodeName.toLowerCase() == "select" )	{
			field.disabled = true;
		}else{
			if(field.type.toLowerCase() == "checkbox" || field.type.toLowerCase() == "radio" ){
				if(field.name != ""){
					var items = document.getElementsByName(field.name);
					for (var j = 0; j < items.length; j++) {
						items[j].disabled = true;
						//items[j].onclick = function(){return false;}; 
					}
				}else{
					field.disabled = true;
				}
			}else{
				field.disabled = true;
			}	
		}
	}
});

</script>

<%
	}
%>
